var express = require('express');
let data = require('../public/js/data');
var router = express.Router();

// 设置路由
// get 请求
router.get('/', function(req, res) {
    res.send(data.loginTest);
});
// post 请求
router.post('/user', function(req, res) {
    console.log(req.body);
    res.send('登录成功！')
});
// 模板引擎测试
router.get('/home',function(req, res) {
    res.render('home.html',{title:'express-art-template-title'});
})

// 导出路由;

module.exports = router;